\name{is.multitype.pp3}
\alias{is.multitype.pp3}
\title{Check if a 3D Point Pattern is Multitype}
\description{
  Checks whether a three-dimensional point pattern is a multitype pattern.
}
\usage{
  is.multitype.pp3(X)
}
\arguments{
  \item{X}{A point pattern (object of class \code{pp3}).}
}
\value{
  Logical value: \code{TRUE} if \code{X} is a multitype point pattern,
  \code{FALSE} otherwise.
}
\details{
  A multitype point pattern is a marked point pattern where the marks
  are a factor with at least two levels.
  
  This function checks whether \code{X} is a \code{pp3} object,
  whether it has marks, whether the marks are a factor,
  and whether there are at least two distinct levels of the factor.
}
\seealso{
  \code{\link{pp3multitype}} for creating multitype 3D point patterns,
  \code{\link{pcfcross3D}} for cross-type pair correlation function.
}
\examples{
  \dontrun{
  if(require(spatstat.geom)) {
    # Create a 3D point pattern with marks
    box <- box3(xrange=c(0,1), yrange=c(0,1), zrange=c(0,1))
    coords <- matrix(runif(300), ncol=3)
    
    # Single type
    marks1 <- factor(rep("A", 100))
    X1 <- pp3(x=coords[,1], y=coords[,2], z=coords[,3], domain=box, marks=marks1)
    is.multitype.pp3(X1)  # FALSE
    
    # Multitype
    marks2 <- factor(sample(c("A", "B"), 100, replace=TRUE))
    X2 <- pp3(x=coords[,1], y=coords[,2], z=coords[,3], domain=box, marks=marks2)
    is.multitype.pp3(X2)  # TRUE
  }
  }
}